import Taro from '@tarojs/taro-rn';
import React from 'react';
import { Component } from "@tarojs/taro-rn";
import { View, Image } from "@tarojs/components-rn";
import { getRuntime, servicePhoneNumber } from "../../utils/common";
import success_icon from '../../assets/img/icon_29.png';
// 表单提交成功
let SubmitSuccess = class SubmitSuccess extends Component {
  constructor() {
    super();
  }
  componentWillMount() {
    Taro.setNavigationBarTitle({ title: '举报成功' });
  }
  handelRouter(url = '/pages/index/index') {
    console.error(url);
    getRuntime().navigateTo(url);
  }
  makePhone() {
    getRuntime().makePhoneCall(servicePhoneNumber);
  }
  render() {
    return <View className="apply-success">
       <View className="content">
         <Image className="success-icon" src={success_icon} />
         <View className="title">举报提交成功</View>
         <View className="desc">我们会为您核实举报信息并作出处理~</View>
         <View className="tel">投诉举报热线：{servicePhoneNumber}</View>
       </View>
       <View className="btn-group">
         <View className="btn btn-active" onClick={this.handelRouter.bind(this, '/pages/index/index')}>返回首页</View>
         <View className="btn" onClick={this.makePhone.bind(this)}>拨打举报电话</View>
       </View>
     </View>;
  }
};

export default SubmitSuccess;